#include <stdio.h>
#include <math.h>
double fun(double x,int n);
int main(){
    double x;
    int n;
    scanf("%lf %d",&x,&n);
    printf("%.2lf",fun(x,n));
    return 0;
}

double fun(double x,int n)
{
    if(n==0)
        return 1;
    else if(n==1)
        return x;
    else
        return ((double)(2*n-1)*x*fun(x,n-1)-(double)(n-1)*fun(x,n-2))/(double)n;
}
